#!/usr/bin/env python
#-*- coding:utf-8 -*-

# file:lendModel.py
# author:ytytyt
# datetime:2021/6/27 16:28
# software: PyCharm
'''
this is functiondescription
'''
# import module your need
from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()

class LendModel(db.Model):
    __tablename__ = 'lend_info'

    id = Column(Integer, primary_key=True)
    reader_id = Column(Integer, nullable=False)
    book_id = Column(Integer, nullable=False)
    lend_date = Column(TIMESTAMP, nullable=False, server_default=text("CURRENT_TIMESTAMP"))
    day = Column(Integer, server_default=text("'15'"))
    current = Column(TINYINT, nullable=False, server_default=text("'0'"))


